package com.gy.spark.core.transformations

import org.apache.spark.{SparkConf, SparkContext}

object Operator_filter_map_flatmap {

  def main(args: Array[String]): Unit = {

    val conf = new SparkConf().setAppName(this.getClass.getSimpleName).setMaster("local")
    val sc = new SparkContext(conf)

    val rdd = sc.textFile("spark/input/words.txt")

    rdd.filter("java".equalsIgnoreCase).foreach(println)

    rdd.map(_+"=>").foreach(println)

    rdd.flatMap(x=>{
      x.toCharArray
    }).foreach(println)

  }


}
